import { Body, Controller, Post, Query } from "@nestjs/common";
import { title } from "process";
import { ArticleCreateDto } from "src/core/dto/article-create.dto";
import { BlogCreateDto } from "src/core/dto/blog-create.dto";

@Controller()
export class ArticleController {
    @Post()
    createArticleByQuery(
        @Query('title') title: string,
        @Query('authorId') authorId: string,
        @Body() ArticleCreateDto: ArticleCreateDto
    ) {
        return {
            title,
            authorId,
            ArticleCreateDto
        }
    }

    @Post('blog')
    create(
        @Body() BlogCreateDto: BlogCreateDto
    ) {
        return BlogCreateDto;
    }
}